import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    loginStatus:0
  },

  getters: {

  },
  mutations: {
    login(state) { 
      state.loginStatus = 1
      console.log("登录状态设置成功！");
    },
    loginOut(state) { 
      state.loginStatus = 0
      console.log("退出状态设置成功！");
    }
  },
  actions: {
    login({ commit}) { 
      commit("login")
    },
    loginOut({ commit}) {
      commit("loginOut")
    }
  },
  modules: {
  }
})
